/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * AlterarComponentes.java
 *
 * Created on 26/06/2011, 12:26:43
 */

package campeonatobrasuka;

/**
 *
 * @author Beatriz
 */
public class AlterarComponentes extends javax.swing.JFrame {

    /** Creates new form AlterarComponentes */
    public AlterarComponentes() {
        initComponents();
}

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setName("Form"); // NOI18N

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(campeonatobrasuka.CampeonatoBrasukaApp.class).getContext().getResourceMap(AlterarComponentes.class);
        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(15, 15, 15)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 786, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel1))
                .addContainerGap(583, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addGap(18, 18, 18)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 546, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(153, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    public void setTipoAlteracao(Object obj){       
        
        Clube c;
        Jogador j;
        Tecnico tecn;
        Arbitro a;
        Presidente pres;
        Estadio e;
        Partida p;

        Class<? extends Object> aClass = obj.getClass();
        String[] split = aClass.getName().split(".");
        String s= split[split.length-1];                
        /*
        if ( s.equals("Clube")) {
            c = new Clube();
            jScrollPane1.setViewportView(c);
        }
        else if (tipo.equals("Jogador")) {
            j = new Jogador();
            jScrollPane1.setViewportView(j);
        }
        else if (tipo.equals("Técnico")) {
            tecn = new Tecnico();
            jScrollPane1.setViewportView(tecn);
        }
         else if(tipo.equals("Árbitro")) {
            a = new Arbitro();
            jScrollPane1.setViewportView(a);
        }
        else if(  tipo.equals("Presidente"))
        {
            pres = new Presidente();
            jScrollPane1.setViewportView(pres);
        }
        else if ( tipo.equals("Estadio")){
            e = new Estadio();
            jScrollPane1.setViewportView(e);
        }
        else if (  tipo.equals("Partida")){
           p = new Partida();
           jScrollPane1.setViewportView(p);
        }
*/
    }
    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new AlterarComponentes().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JScrollPane jScrollPane1;
    // End of variables declaration//GEN-END:variables

}
